double yalign;
};
-typedef enum
+typedef enum
{
SELECT_CHARACTERS,
SELECT_WORDS,
GdkRectangle target_rect;
target_rect = priv->text_window->allocation;
-
+
if (x < target_rect.x ||
y < target_rect.y ||
x > (target_rect.x + target_rect.width) ||
P_("Whether Tab will result in a tab character being entered"),
TRUE,
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
-
+
/**
* GtkTextView:im-module:
*
* - <kbd>Ctrl</kbd>-<kbd>PgUp</kbd>, <kbd>Ctrl</kbd>-<kbd>PgDn</kbd>
* move horizontally by pages
*/
- signals[MOVE_CURSOR] =
+ signals[MOVE_CURSOR] =
g_signal_new (I_("move-cursor"),
- G_OBJECT_CLASS_TYPE (gobject_class),
- G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
+ G_OBJECT_CLASS_TYPE (gobject_class),
+ G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
G_STRUCT_OFFSET (GtkTextViewClass, move_cursor),
- NULL, NULL,
- _gtk_marshal_VOID__ENUM_INT_BOOLEAN,
+ NULL, NULL,
+ _gtk_marshal_VOID__ENUM_INT_BOOLEAN,
G_TYPE_NONE, 3,
- GTK_TYPE_MOVEMENT_STEP,
- G_TYPE_INT,
+ GTK_TYPE_MOVEMENT_STEP,
+ G_TYPE_INT,
G_TYPE_BOOLEAN);
g_signal_set_va_marshaller (signals[MOVE_CURSOR],
G_OBJECT_CLASS_TYPE (gobject_class),
/**
* GtkTextView|selection.delete:
*
- * Deletes the current selection.
+ * Deletes the current selection.
*/
gtk_widget_class_install_action (widget_class, "selection.delete", NULL,
gtk_text_view_activate_selection_delete);
/**
* GtkTextView|menu.popup:
*
- * Opens the context menu.
+ * Opens the context menu.
*/
gtk_widget_class_install_action (widget_class, "menu.popup", NULL, gtk_text_view_popup_menu);
add_move_binding (widget_class, GDK_KEY_KP_Right, 0,
GTK_MOVEMENT_VISUAL_POSITIONS, 1);
-
+
add_move_binding (widget_class, GDK_KEY_Left, 0,
GTK_MOVEMENT_VISUAL_POSITIONS, -1);
add_move_binding (widget_class, GDK_KEY_KP_Left, 0,
GTK_MOVEMENT_VISUAL_POSITIONS, -1);
-
+
add_move_binding (widget_class, GDK_KEY_Right, GDK_CONTROL_MASK,
GTK_MOVEMENT_WORDS, 1);
add_move_binding (widget_class, GDK_KEY_KP_Right, GDK_CONTROL_MASK,
GTK_MOVEMENT_WORDS, 1);
-
+
add_move_binding (widget_class, GDK_KEY_Left, GDK_CONTROL_MASK,
GTK_MOVEMENT_WORDS, -1);
add_move_binding (widget_class, GDK_KEY_KP_Left, GDK_CONTROL_MASK,
GTK_MOVEMENT_WORDS, -1);
-
+
add_move_binding (widget_class, GDK_KEY_Up, 0,
GTK_MOVEMENT_DISPLAY_LINES, -1);
add_move_binding (widget_class, GDK_KEY_KP_Up, 0,
GTK_MOVEMENT_DISPLAY_LINES, -1);
-
+
add_move_binding (widget_class, GDK_KEY_Down, 0,
GTK_MOVEMENT_DISPLAY_LINES, 1);
add_move_binding (widget_class, GDK_KEY_KP_Down, 0,
GTK_MOVEMENT_DISPLAY_LINES, 1);
-
+
add_move_binding (widget_class, GDK_KEY_Up, GDK_CONTROL_MASK,
GTK_MOVEMENT_PARAGRAPHS, -1);
add_move_binding (widget_class, GDK_KEY_KP_Up, GDK_CONTROL_MASK,
GTK_MOVEMENT_PARAGRAPHS, -1);
-
+
add_move_binding (widget_class, GDK_KEY_Down, GDK_CONTROL_MASK,
GTK_MOVEMENT_PARAGRAPHS, 1);
add_move_binding (widget_class, GDK_KEY_KP_Down, GDK_CONTROL_MASK,
GTK_MOVEMENT_PARAGRAPHS, 1);
-
+
add_move_binding (widget_class, GDK_KEY_Home, 0,
GTK_MOVEMENT_DISPLAY_LINE_ENDS, -1);
add_move_binding (widget_class, GDK_KEY_KP_Home, 0,
GTK_MOVEMENT_DISPLAY_LINE_ENDS, -1);
-
+
add_move_binding (widget_class, GDK_KEY_End, 0,
GTK_MOVEMENT_DISPLAY_LINE_ENDS, 1);
add_move_binding (widget_class, GDK_KEY_KP_End, 0,
GTK_MOVEMENT_DISPLAY_LINE_ENDS, 1);
-
+
add_move_binding (widget_class, GDK_KEY_Home, GDK_CONTROL_MASK,
GTK_MOVEMENT_BUFFER_ENDS, -1);
add_move_binding (widget_class, GDK_KEY_KP_Home, GDK_CONTROL_MASK,
GTK_MOVEMENT_BUFFER_ENDS, -1);
-
+
add_move_binding (widget_class, GDK_KEY_End, GDK_CONTROL_MASK,
GTK_MOVEMENT_BUFFER_ENDS, 1);
add_move_binding (widget_class, GDK_KEY_KP_End, GDK_CONTROL_MASK,
GTK_MOVEMENT_BUFFER_ENDS, 1);
-
+
add_move_binding (widget_class, GDK_KEY_Page_Up, 0,
GTK_MOVEMENT_PAGES, -1);
add_move_binding (widget_class, GDK_KEY_KP_Page_Up, 0,
GTK_MOVEMENT_PAGES, -1);
-
+
add_move_binding (widget_class, GDK_KEY_Page_Down, 0,
GTK_MOVEMENT_PAGES, 1);
add_move_binding (widget_class, GDK_KEY_KP_Page_Up, GDK_CONTROL_MASK,
GTK_MOVEMENT_HORIZONTAL_PAGES, -1);
-
+
add_move_binding (widget_class, GDK_KEY_Page_Down, GDK_CONTROL_MASK,
GTK_MOVEMENT_HORIZONTAL_PAGES, 1);
GDK_KEY_slash, GDK_CONTROL_MASK,
"select-all",
"(b)", TRUE);
-
+
/* Unselect all */
gtk_widget_class_add_binding_signal (widget_class,
GDK_KEY_backslash, GDK_CONTROL_MASK,
GDK_KEY_KP_Delete, 0,
"delete-from-cursor",
"(ii)", GTK_DELETE_CHARS, 1);
-
+
gtk_widget_class_add_binding_signal (widget_class,
GDK_KEY_BackSpace, 0,
"backspace",
GDK_KEY_KP_Delete, GDK_CONTROL_MASK,
"delete-from-cursor",
"(ii)", GTK_DELETE_WORD_ENDS, 1);
-
+
gtk_widget_class_add_binding_signal (widget_class,
GDK_KEY_BackSpace, GDK_CONTROL_MASK,
"delete-from-cursor",
GDK_KEY_KP_Tab, GDK_CONTROL_MASK,
"move-focus",
"(i)", GTK_DIR_TAB_FORWARD);
-
+
gtk_widget_class_add_binding_signal (widget_class,
GDK_KEY_Tab, GDK_SHIFT_MASK | GDK_CONTROL_MASK,
"move-focus",
g_object_unref (old_buffer);
g_object_notify (G_OBJECT (text_view), "buffer");
-
+
if (gtk_widget_get_visible (GTK_WIDGET (text_view)))
gtk_widget_queue_draw (GTK_WIDGET (text_view));
g_return_if_fail (gtk_text_iter_get_buffer (iter) == get_buffer (text_view));
gtk_text_view_ensure_layout (text_view);
-
+
gtk_text_layout_get_iter_location (text_view->priv->layout, iter, location);
}
g_return_if_fail (gtk_text_iter_get_buffer (iter) == get_buffer (text_view));
gtk_text_view_ensure_layout (text_view);
-
+
gtk_text_layout_get_line_yrange (text_view->priv->layout,
iter,
y,
g_return_if_fail (GTK_IS_TEXT_VIEW (text_view));
gtk_text_view_ensure_layout (text_view);
-
+
gtk_text_layout_get_line_at_y (text_view->priv->layout,
target_iter,
y,
* from flush_scroll in this function? I think it wasn't done before
* because changed_handler was screwed up, but I could be wrong.
*/
-
+
g_return_val_if_fail (GTK_IS_TEXT_VIEW (text_view), FALSE);
g_return_val_if_fail (iter != NULL, FALSE);
g_return_val_if_fail (within_margin >= 0.0 && within_margin < 0.5, FALSE);
g_return_val_if_fail (xalign >= 0.0 && xalign <= 1.0, FALSE);
g_return_val_if_fail (yalign >= 0.0 && yalign <= 1.0, FALSE);
-
+
widget = GTK_WIDGET (text_view);
DV(g_print(G_STRLOC"\n"));
-
+
gtk_text_layout_get_iter_location (priv->layout,
iter,
&cursor);
retval = (screen.y != screen_dest.y) || (screen.x != screen_dest.x);
DV(g_print (">%s ("G_STRLOC")\n", retval ? "Actually scrolled" : "Didn't end up scrolling"));
-
+
return retval;
}
GtkTextPendingScroll *scroll;
DV(g_print(G_STRLOC"\n"));
-
+
scroll = g_slice_new (GtkTextPendingScroll);
scroll->within_margin = within_margin;
scroll->use_align = use_align;
scroll->xalign = xalign;
scroll->yalign = yalign;
-
+
gtk_text_buffer_get_iter_at_mark (get_buffer (text_view), &iter, mark);
scroll->mark = gtk_text_buffer_create_mark (get_buffer (text_view),
gtk_text_mark_get_left_gravity (mark));
g_object_ref (scroll->mark);
-
+
cancel_pending_scroll (text_view);
text_view->priv->pending_scroll = scroll;
GtkWidget *widget;
widget = GTK_WIDGET (text_view);
-
+
DV(g_print(G_STRLOC"\n"));
-
+
if (text_view->priv->pending_scroll == NULL)
{
DV (g_print ("in flush scroll, no pending scroll\n"));
/* avoid recursion */
text_view->priv->pending_scroll = NULL;
-
+
gtk_text_buffer_get_iter_at_mark (get_buffer (text_view), &iter, scroll->mark);
/* Validate area around the scroll destination, so the adjustment
/* Ensure we have updated width/height */
gtk_text_view_update_adjustments (text_view);
-
+
retval = _gtk_text_view_scroll_to_iter (text_view,
&iter,
scroll->within_margin,
gtk_text_view_update_layout_width (GtkTextView *text_view)
{
DV(g_print(">Updating layout width ("G_STRLOC")\n"));
-
+
gtk_text_view_ensure_layout (text_view);
gtk_text_layout_set_screen_width (text_view->priv->layout,
if (text_view->priv->layout == NULL)
return;
-
+
gtk_text_view_get_cursor_locations (text_view, NULL, &area, NULL);
area.x -= text_view->priv->xoffset;
area.y -= text_view->priv->yoffset;
-
+
/* Width returned by Pango indicates direction of cursor,
* by its sign more than the size of cursor.
*/
gboolean use_align,
double xalign,
double yalign)
-{
+{
g_return_if_fail (GTK_IS_TEXT_VIEW (text_view));
g_return_if_fail (GTK_IS_TEXT_MARK (mark));
g_return_if_fail (within_margin >= 0.0 && within_margin < 0.5);
g_assert (priv->top_child == NULL);
g_assert (priv->bottom_child == NULL);
g_assert (priv->center_child == NULL);
-
+
cancel_pending_scroll (text_view);
if (priv->tabs)
pango_tab_array_free (priv->tabs);
-
+
if (priv->hadjustment)
g_object_unref (priv->hadjustment);
if (priv->vadjustment)
case PROP_WRAP_MODE:
gtk_text_view_set_wrap_mode (text_view, g_value_get_enum (value));
break;
-
+
case PROP_JUSTIFICATION:
gtk_text_view_set_justification (text_view, g_value_get_enum (value));
break;
case PROP_ACCEPTS_TAB:
gtk_text_view_set_accepts_tab (text_view, g_value_get_boolean (value));
break;
-
+
case PROP_IM_MODULE:
g_free (priv->im_module);
priv->im_module = g_value_dup_string (value);
case PROP_EDITABLE:
g_value_set_boolean (value, priv->editable);
break;
-
+
case PROP_WRAP_MODE:
g_value_set_enum (value, priv->wrap_mode);
break;
case PROP_ACCEPTS_TAB:
g_value_set_boolean (value, priv->accepts_tab);
break;
-
+
case PROP_IM_MODULE:
g_value_set_string (value, priv->im_module);
break;
int buffer_y;
GtkTextIter iter;
GtkRequisition req;
-
+
gtk_text_buffer_get_iter_at_child_anchor (get_buffer (text_view),
&iter,
vc->anchor);
GtkAllocation allocation;
gtk_text_view_compute_child_allocation (text_view, vc, &allocation);
-
+
gtk_widget_size_allocate (vc->widget, &allocation, -1);
#if 0
{
AnchoredChild *vc = NULL;
GtkTextView *text_view = data;
-
+
/* x,y is the position of the child from the top of the line, and
* from the left of the buffer. We have to translate that into text
* window coordinates, then size_allocate the child.
g_assert (vc != NULL);
DV (g_print ("child allocated at %d,%d\n", x, y));
-
+
vc->from_left_of_buffer = x;
vc->from_top_of_line = y;
/* Since anchored children are only ever allocated from
* gtk_text_layout_get_line_display() we have to make sure
- * that the display line caching in the layout doesn't
+ * that the display line caching in the layout doesn't
* get in the way. Invalidating the layout around the anchor
* achieves this.
- */
+ */
if (_gtk_widget_get_alloc_needed (child->widget))
{
GtkTextIter end = child_loc;
GtkWidget *chooser;
PangoLayout *layout;
guint mru_size;
-
+
text_view = GTK_TEXT_VIEW (widget);
priv = text_view->priv;
}
gtk_text_view_update_layout_width (text_view);
-
+
/* Note that this will do some layout validation */
gtk_text_view_allocate_children (text_view);
/* The GTK resize loop processes all the pending exposes right
* after doing the resize stuff, so the idle sizer won't have a
- * chance to run. So we do the work here.
+ * chance to run. So we do the work here.
*/
gtk_text_view_flush_first_validate (text_view);
widget = GTK_WIDGET (text_view);
priv = text_view->priv;
-
+
DV(g_print(">Validating onscreen ("G_STRLOC")\n"));
-
+
if (SCREEN_HEIGHT (widget) > 0)
{
GtkTextIter first_para;
priv->onscreen_validated = TRUE;
DV(g_print(">Done validating onscreen, onscreen_validated = TRUE ("G_STRLOC")\n"));
-
+
/* This can have the odd side effect of triggering a scroll, which should
* flip "onscreen_validated" back to FALSE, but should also get us
* back into this function to turn it on again.
DV (g_print ("removing first validate in %s\n", G_STRLOC));
g_source_remove (priv->first_validate_idle);
priv->first_validate_idle = 0;
-
+
/* be sure we have up-to-date screen size set on the
* layout.
*/
if (!gtk_text_view_flush_scroll (text_view) ||
!priv->onscreen_validated)
gtk_text_view_validate_onscreen (text_view);
-
+
DV(g_print(">Leaving first validate idle ("G_STRLOC")\n"));
-
+
g_assert (priv->onscreen_validated);
}
}
/* Note that some of this code is duplicated at the end of size_allocate,
* keep in sync with that.
*/
-
+
DV(g_print(G_STRLOC"\n"));
gtk_text_view_flush_first_validate (text_view);
-
+
return FALSE;
}
gboolean result = TRUE;
DV(g_print(G_STRLOC"\n"));
-
+
gtk_text_layout_validate (text_view->priv->layout, 2000);
gtk_text_view_update_adjustments (text_view);
-
+
if (gtk_text_layout_is_valid (text_view->priv->layout))
{
text_view->priv->incremental_validate_idle = 0;
/* We'll invalidate when the layout is created */
if (priv->layout == NULL)
return;
-
+
if (!priv->first_validate_idle)
{
priv->first_validate_idle = g_idle_add_full (GTK_PRIORITY_RESIZE - 2, first_validate_callback, text_view, NULL);
DV (g_print (G_STRLOC": adding first validate idle %d\n",
priv->first_validate_idle));
}
-
+
if (!priv->incremental_validate_idle)
{
priv->incremental_validate_idle = g_idle_add_full (GTK_TEXT_VIEW_PRIORITY_VALIDATE, incremental_validate_callback, text_view, NULL);
GtkTextView *text_view;
GtkTextViewPrivate *priv;
GtkWidget *widget;
-
+
text_view = GTK_TEXT_VIEW (data);
priv = text_view->priv;
widget = GTK_WIDGET (data);
-
+
DV(g_print(">Lines Validated ("G_STRLOC")\n"));
if (gtk_widget_get_realized (widget))
GtkTextIter first;
int new_first_para_top;
int old_first_para_top;
-
+
/* If the bottom of the old area was above the top of the
* screen, we need to scroll to keep the current top of the
* screen in place. Remember that first_para_pixels is the
if (new_first_para_top != old_first_para_top)
{
priv->yoffset += new_first_para_top - old_first_para_top;
-
+
gtk_adjustment_set_value (text_view->priv->vadjustment, priv->yoffset);
}
{
GtkTextView *text_view;
GtkTextViewPrivate *priv;
-
+
text_view = GTK_TEXT_VIEW (widget);
priv = text_view->priv;
DV(g_print (">Exposed ("G_STRLOC")\n"));
- draw_text (widget, snapshot);
+ draw_text (widget, snapshot);
snapshot_text_view_child (widget, priv->left_child, snapshot);
snapshot_text_view_child (widget, priv->right_child, snapshot);
snapshot_text_view_child (widget, priv->bottom_child, snapshot);
snapshot_text_view_child (widget, priv->center_child, snapshot);
- /* Propagate exposes to all unanchored children.
- * Anchored children are handled in gtk_text_view_paint().
- */
for (iter = priv->anchored_children.head; iter; iter = iter->next)
{
const AnchoredChild *vc = iter->data;
{
GtkTextMark *insert;
GtkTextIter iter;
-
+
insert = gtk_text_buffer_get_insert (get_buffer (text_view));
gtk_text_buffer_get_iter_at_mark (get_buffer (text_view), &iter, insert);
-
+
if (gtk_text_iter_editable (&iter, text_view->priv->editable))
return blink;
}
GtkScrollStep scroll_step;
double old_xpos, old_ypos;
- switch (step)
+ switch (step)
{
case GTK_MOVEMENT_VISUAL_POSITIONS:
leave_direction = count > 0 ? GTK_DIR_RIGHT : GTK_DIR_LEFT;
break;
case GTK_MOVEMENT_DISPLAY_LINE_ENDS:
scroll_step = GTK_SCROLL_HORIZONTAL_ENDS;
- break;
+ break;
case GTK_MOVEMENT_DISPLAY_LINES:
leave_direction = count > 0 ? GTK_DIR_DOWN : GTK_DIR_UP;
G_GNUC_FALLTHROUGH;
if (count < 0)
gtk_text_iter_backward_visible_word_starts (&newplace, -count);
- else if (count > 0)
+ else if (count > 0)
{
if (!gtk_text_iter_forward_visible_word_ends (&newplace, count))
gtk_text_iter_forward_to_line_end (&newplace);
else if (count < 0)
gtk_text_buffer_get_iter_at_offset (get_buffer (text_view), &newplace, 0);
break;
-
+
case GTK_MOVEMENT_PAGES:
case GTK_MOVEMENT_HORIZONTAL_PAGES:
/* We handle these cases above and return early from them. */
break;
}
- /* call move_cursor() even if the cursor hasn't moved, since it
+ /* call move_cursor() even if the cursor hasn't moved, since it
cancels the selection
*/
move_cursor (text_view, &newplace, extend_selection);
{
GtkAdjustment *adjustment;
double increment;
-
- switch (step)
+
+ switch (step)
{
case GTK_SCROLL_STEPS:
case GTK_SCROLL_PAGES:
break;
}
- switch (step)
+ switch (step)
{
case GTK_SCROLL_STEPS:
case GTK_SCROLL_HORIZONTAL_STEPS:
priv = text_view->priv;
g_return_val_if_fail (priv->vadjustment != NULL, FALSE);
-
+
adjustment = priv->vadjustment;
insert_mark = gtk_text_buffer_get_insert (get_buffer (text_view));
gtk_text_view_set_virtual_cursor_pos (text_view, cursor_x_pos, cursor_y_pos);
}
-
+
/* Adjust to have the cursor _entirely_ onscreen, move_mark_onscreen
* only guarantees 1 pixel onscreen.
*/
* back to get the end of the line onscreen.
* http://bugzilla.gnome.org/show_bug.cgi?id=68963
*/
-
+
/* Adjust to have the cursor _entirely_ onscreen, move_mark_onscreen
* only guarantees 1 pixel onscreen.
*/
gtk_text_view_cut_clipboard (GtkTextView *text_view)
{
GdkClipboard *clipboard = gtk_widget_get_clipboard (GTK_WIDGET (text_view));
-
+
gtk_text_buffer_cut_clipboard (get_buffer (text_view),
clipboard,
text_view->priv->editable);
gtk_text_view_copy_clipboard (GtkTextView *text_view)
{
GdkClipboard *clipboard = gtk_widget_get_clipboard (GTK_WIDGET (text_view));
-
+
gtk_text_buffer_copy_clipboard (get_buffer (text_view), clipboard);
/* on copy do not scroll, we are already onscreen */
gtk_text_view_paste_clipboard (GtkTextView *text_view)
{
GdkClipboard *clipboard = gtk_widget_get_clipboard (GTK_WIDGET (text_view));
-
+
text_view->priv->scroll_after_paste = TRUE;
gtk_text_buffer_paste_clipboard (get_buffer (text_view),
text_view = GTK_TEXT_VIEW (data);
- gtk_text_view_scroll_mark_onscreen (text_view,
+ gtk_text_view_scroll_mark_onscreen (text_view,
gtk_text_buffer_get_insert (get_buffer (text_view)));
return TRUE; /* remain installed. */
* cursor however be inside the selection (this happens on triple click) then we
* move the side which was last moved (current insert mark) */
if (gtk_text_iter_compare (&cursor, &old_start) <= 0 ||
- (gtk_text_iter_compare (&cursor, &old_end) < 0 &&
+ (gtk_text_iter_compare (&cursor, &old_end) < 0 &&
gtk_text_iter_compare (&old_ins, &old_bound) <= 0))
{
bound = old_end;
PangoContext *ltr_context, *rtl_context;
DV(g_print(G_STRLOC"\n"));
-
+
priv->layout = gtk_text_layout_new ();
g_signal_connect (priv->layout,
"allocate-child",
G_CALLBACK (gtk_anchored_child_allocated),
text_view);
-
+
if (get_buffer (text_view))
gtk_text_layout_set_buffer (priv->layout, get_buffer (text_view));
gtk_text_view_get_default_attributes (GtkTextView *text_view)
{
g_return_val_if_fail (GTK_IS_TEXT_VIEW (text_view), NULL);
-
+
gtk_text_view_ensure_layout (text_view);
return gtk_text_attributes_copy (text_view->priv->layout->default_style);
gtk_text_layout_get_iter_at_pixel (priv->layout,
&newplace,
- bx, by);
+ bx, by);
if (gtk_text_buffer_get_selection_bounds (get_buffer (text_view),
&start, &end) &&
/* We're inside the selection. */
}
else
- {
+ {
can_accept = gtk_text_iter_can_insert (&newplace, priv->editable);
}
/* Note that we oddly call this function with adjustment == NULL
* sometimes
*/
-
+
priv->onscreen_validated = FALSE;
DV(g_print(">Scroll offset changed %s/%g, onscreen_validated = FALSE ("G_STRLOC")\n",
adjustment == priv->hadjustment ? "hadjustment" : adjustment == priv->vadjustment ? "vadjustment" : "none",
adjustment ? gtk_adjustment_get_value (adjustment) : 0.0));
-
+
if (adjustment == priv->hadjustment)
{
dx = priv->xoffset - (int)gtk_adjustment_get_value (adjustment);
priv->first_para_pixels = gtk_adjustment_get_value (adjustment) - line_top;
}
}
-
+
if (dx != 0 || dy != 0)
{
if (gtk_widget_get_realized (GTK_WIDGET (text_view)))
* first_validate_idle shouldn't have anything to do.
*/
gtk_text_view_update_layout_width (text_view);
-
+
/* We also update the IM spot location here, since the IM context
* might do something that leads to validation.
*/
* that, or shouldn't be.
*/
gtk_text_view_validate_onscreen (text_view);
-
+
/* If this got installed, get rid of it, it's just a waste of time. */
if (priv->first_validate_idle != 0)
{
GtkTextIter start_iter, end_iter, insert;
buffer = text_view->priv->buffer;
- if (select)
+ if (select)
{
gtk_text_buffer_get_bounds (buffer, &start_iter, &end_iter);
gtk_text_buffer_select_range (buffer, &start_iter, &end_iter);
}
- else
+ else
{
gtk_text_buffer_get_iter_at_mark (buffer, &insert,
gtk_text_buffer_get_insert (buffer));
g_object_set_qdata (G_OBJECT (child), quark_text_view_child, vc);
gtk_text_child_anchor_register_child (anchor, child, layout);
-
+
return vc;
}